package com.xinchuang.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName test_record_source_table
 */
@TableName(value ="test_record_source_table")
@Data
public class TestRecordSourceTable implements Serializable {
    /**
     * 标识ID
     */
    @TableId
    private String sourceId;

    /**
     * 记录表ID
     */
    private String parentRecordId;

    /**
     * 问题来源
     */
    private String source;

    /**
     * 责任部门
     */
    private String responsibleDepartment;

    /**
     * 责任人部门ID
     */
    private String responsiblePersonUnitId;

    /**
     * 责任人
     */
    private String responsiblePerson;

    /**
     * 计划完成时间
     */
    private String planCompletionTime;

    /**
     * 责任人自检部门ID
     */
    private String inspectionUnitId;

    /**
     * 责任人自检
     */
    private String inspection;

    /**
     * 整改方案
     */
    private String remediationAction;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更改时间
     */
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TestRecordSourceTable other = (TestRecordSourceTable) that;
        return (this.getSourceId() == null ? other.getSourceId() == null : this.getSourceId().equals(other.getSourceId()))
            && (this.getParentRecordId() == null ? other.getParentRecordId() == null : this.getParentRecordId().equals(other.getParentRecordId()))
            && (this.getSource() == null ? other.getSource() == null : this.getSource().equals(other.getSource()))
            && (this.getResponsibleDepartment() == null ? other.getResponsibleDepartment() == null : this.getResponsibleDepartment().equals(other.getResponsibleDepartment()))
            && (this.getResponsiblePerson() == null ? other.getResponsiblePerson() == null : this.getResponsiblePerson().equals(other.getResponsiblePerson()))
            && (this.getPlanCompletionTime() == null ? other.getPlanCompletionTime() == null : this.getPlanCompletionTime().equals(other.getPlanCompletionTime()))
            && (this.getInspection() == null ? other.getInspection() == null : this.getInspection().equals(other.getInspection()))
            && (this.getRemediationAction() == null ? other.getRemediationAction() == null : this.getRemediationAction().equals(other.getRemediationAction()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSourceId() == null) ? 0 : getSourceId().hashCode());
        result = prime * result + ((getParentRecordId() == null) ? 0 : getParentRecordId().hashCode());
        result = prime * result + ((getSource() == null) ? 0 : getSource().hashCode());
        result = prime * result + ((getResponsibleDepartment() == null) ? 0 : getResponsibleDepartment().hashCode());
        result = prime * result + ((getResponsiblePerson() == null) ? 0 : getResponsiblePerson().hashCode());
        result = prime * result + ((getPlanCompletionTime() == null) ? 0 : getPlanCompletionTime().hashCode());
        result = prime * result + ((getInspection() == null) ? 0 : getInspection().hashCode());
        result = prime * result + ((getRemediationAction() == null) ? 0 : getRemediationAction().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", sourceId=").append(sourceId);
        sb.append(", parentRecordId=").append(parentRecordId);
        sb.append(", source=").append(source);
        sb.append(", responsibleDepartment=").append(responsibleDepartment);
        sb.append(", responsiblePerson=").append(responsiblePerson);
        sb.append(", planCompletionTime=").append(planCompletionTime);
        sb.append(", inspection=").append(inspection);
        sb.append(", remediationAction=").append(remediationAction);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}